<form action="index.php?app=ome&ctl=admin_delivery_cfg&act=index" method="post" name="cfg_form" id="form_cfg">
<h3>配置打印数据</h3>
    <table class="table-action">
        <tr>
                <th>批量打印数量：</th>
                <td align="left"><input type="text" name="set[ome_batch_print_nums]"  value="<{if $data.set.ome_batch_print_nums}><{$data.set.ome_batch_print_nums}><{else}>100<{/if}>" vtype="required&&unsignedint"/><{help}>批量打印单据数量上限<{/help}></td>
        </tr>
        <tr>
        	<td></td>
            <td align="left"><a target="dialog::{width:1000,height:400,title:'打印样式'}" href="index.php?app=ome&ctl=admin_receipts_print&act=showPrintStyle" label="打印样式">
    		<span>打印样式    		</span>
    	</a></td>
        </tr>
        <tr>
            <td style="width: 120px">备货单:</td>
            <td align="left">
            <{if $data.set.stock == ''}>
                <input type="radio" onchange="check(1)" name="set[stock]" id="stock_0" value="0" >关闭
                <input type="radio" onchange="check(1)" name="set[stock]" id="stock_1" value="1" checked >开启
                <{help}>开启备货单<{/help}>
            <{else}>
                <input type="radio" onchange="check(1)" name="set[stock]" id="stock_0" value="0" <{if $data.set.stock == '0'}> checked<{/if}>>关闭
                <input type="radio" onchange="check(1)" name="set[stock]" id="stock_1" value="1" <{if $data.set.stock == '1'}> checked<{/if}>>开启
                <{help}>开启备货单<{/help}>
            <{/if}>    <span id="span_stock_print">备货单商品名称：<select name="set[ome_delivery_is_printstock]">
                    <option value="1" <{if $data.set.ome_delivery_is_printstock==1}>selected="selected"<{/if}>>前台</option>
                    <option value="2" <{if $data.set.ome_delivery_is_printstock==2 || !($data.set.ome_delivery_is_printstock)}>selected="selected"<{/if}>>后台</option>
                </select></span>
            </td>
        </tr>
        <tr>
            <td>发货单:</td>
            <td align="left">
            <{if $data.set.delie == ''}>
                <input type="radio" onchange="check(2)" name="set[delie]" id="delie_0" value="0" >关闭
                <input type="radio" onchange="check(2)" name="set[delie]" id="delie_1" value="1" checked>开启
                <{help}>开启发货单<{/help}>
            <{else}>
                <input type="radio" onchange="check(2)" name="set[delie]" id="delie_0" value="0" <{if $data.set.delie == '0'}> checked<{/if}>>关闭
                <input type="radio" onchange="check(2)" name="set[delie]" id="delie_1" value="1" <{if $data.set.delie == '1'}> checked<{/if}>>开启
                <{help}>开启发货单<{/help}>
            <{/if}>  <span id="span_shipping_print">发货单商品名称：<select name="set[ome_delivery_is_printdelivery]">
                    <option value="1" <{if $data.set.ome_delivery_is_printdelivery==1}>selected="selected"<{/if}>>前台</option>
                    <option value="2" <{if $data.set.ome_delivery_is_printdelivery==2 || !($data.set.ome_delivery_is_printdelivery)}>selected="selected"<{/if}>>后台</option>
                </select>
            </td>
        </tr>
        <tr>
            <td>快递单:</td>
            <td align="left">
                                            开启
                <input type="hidden" name="set[expre]" value="1" >
                <{help}>快递单不能选择(必选)<{/help}>快递单商品名称：<select name="set[ome_delivery_is_printship]">
                    <option value="1" <{if $data.set.ome_delivery_is_printship==1}>selected="selected"<{/if}>>前台</option>
                    <option value="2" <{if $data.set.ome_delivery_is_printship==2 || !($data.set.ome_delivery_is_printship)}>selected="selected"<{/if}>>后台</option>
                </select>
            </td>
        </tr>

    </table>
    <hr>
    <div align="center"><{button label='提交' class='btn-primary' type="submit"}></div>
</form>
<script>
function check(status){
	if(status == 1){
		if($$('input[name=set[stock]]:checked').get('value') == 1){
			$('span_stock_print').show();
		}else{
			$('span_stock_print').hide();
		}
	}else if(status == 2){
		if($$('input[name=set[delie]]:checked').get('value') == 1){
			$('span_shipping_print').show();
		}else{
			$('span_shipping_print').hide();
		}
	}
}
check(1);
check(2);

</script>